<?php
/* 
 * ********* CVS HEADER ********* 
 * 
 * $RCSfile: admgroupman.php,v $ 
 * $Date: 2005/08/29 13:22:12 $ 
 * $Revision: 1.2 $ 
 * 
 * ********* CVS HEADER ********* 
 */
include("environnement/$session[environnement]/header.php");
require_once(get_path_module("admin")); 
$pc = new panneau_controle(); 
$pc->calculRubriqueParFonction('admgroupliste'); 
echo $pc->retourneEntete();
?>
<center>DROIT SUR LE MANAGEMENT DES GROUPES</center><br>

<?php
$query="SELECT * FROM groupe WHERE id='$argid';";
$result=rportalrequete($query) or die ("ERREUR 0055");
$row=rportalligne($result);
echo "groupe : $row[nom]<br><br>\n";
?>
<form method="post" action="?op=admgroupmanmaj">
<table>
  <tr>
<?php
echo "<input type=\"hidden\" name=\"idg\" value=\"$argid\">";
$query="SELECT id_management FROM groupe_management WHERE id_groupe='$argid' ORDER BY id_management";
$result=rportalrequete($query) or die ("ERREUR 0056");
$query="SELECT * FROM groupe ORDER BY id";
$result2=rportalrequete($query) or die ("ERREUR 0057");
$row2=rportalligne($result);
while($row=rportalligne($result2))
{
	echo "<td>$row[nom]</td>\n<td>";
	if($row[id]==$row2[id_management])
	{
		echo "<input type=\"radio\" name=\"argid[$row[id]]\" value=\"0\" checked>oui \n";
		echo "<input type=\"radio\" name=\"argid[$row[id]]\" value=\"2\">non \n";
		$row2=rportalligne($result);
	}
	else
	{
		echo "<input type=\"radio\" name=\"argid[$row[id]]\" value=\"1\">oui \n";
		echo "<input type=\"radio\" name=\"argid[$row[id]]\" value=\"0\" checked>non \n";
	}
	echo "</td></tr>\n";
	
}
?>
<tr>
    <td>&nbsp;</td>
    <td>
        <input type="submit" name="Submit" value="Envoyer">
      </td>
  </tr>
</table>

<?php
include("environnement/$session[environnement]/footer.php");
?>